package cn.sdhuijin.vms.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

@Entity
@Table(name = "t_card")
public class Card extends IdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Column(unique = true)
	private Integer number;

	@Enumerated(EnumType.STRING)
	private CardType type;

	public CardType getType() {
		return type;
	}

	public void setType(CardType type) {
		this.type = type;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public Card() {
	}

	public Card(Integer number, CardType type) {
		this.number = number;
		this.type = type;
	}

	@Override
	public String toString() {
		return "Card [number=" + number + ", type=" + type + "]";
	}

}
